package com.ganxiang.ximenhong.util;

import org.json.JSONArray;

public class DataChangeUtil {

	public static JSONArray combineJsonArray(JSONArray parentJsonArray, JSONArray childrenJSONArray) {
		if (parentJsonArray == null) {
			return null;
		}
		if (childrenJSONArray == null || childrenJSONArray.length() == 0) {
			return parentJsonArray;
		}
		int length = childrenJSONArray.length();
		for (int i = 0; i < length; i++) {
			parentJsonArray.put(childrenJSONArray.optJSONObject(i));
		}
		return parentJsonArray;
	}
}
